<!DOCTYPE html>
<html>
  <head>
    <meta charset="UTF-8">
    <title></title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width,height=device-height,initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no">
    <link rel="stylesheet" href="__ADMIN__/css/font.css">
    <link rel="stylesheet" href="__ADMIN__/css/xadmin.css">
    <script type="text/javascript" src="__ADMIN__/js/jquery.min.js"></script>
    <script type="text/javascript" src="__ADMIN__/lib/layui/layui.js" charset="utf-8"></script>
    <script type="text/javascript" src="__ADMIN__/js/xadmin.js"></script>
    <script type="text/javascript" src="__ADMIN__/js/cookie.js"></script>
    <link rel="stylesheet" href="/static/admin/css/font.css">
    <link rel="stylesheet" href="/static/admin/css/font-awesome.min.css">
    <style>
        .layui-form-item .layui-form-label{
            width: 120px;
        }
        .layui-form-item .layui-textarea{
            width: 190px;
        }
        .layui-form-select dl{z-index: 9999;}
        #phone-one-div {display: none}
    </style>
  </head>
  
<body>
<div class="x-body">
    <div style="text-align:center;margin-bottom:20px;padding:10px 0;border-bottom:1px solid #ccc"><h1>【{$raceInfo.title}】 {$raceInfo.start_date}至{$raceInfo.end_date} {if $raceInfo.race_system == '1'}<button type="button" class="layui-btn layui-btn-xs layui-btn-normal">与公司PK</button>{/if}</h1>  </div>
    <div>
    {foreach name="departList" key="k" id="v"}

    <table class="layui-table" lay-size="sm" style="width:19%; float:left; margin-right:0.75%">
        <thead>
        <tr>
            <td colspan="2" align="center">{$departName[$k]}</td>
        </tr>
        </thead>
        {foreach name="v" id="vv"}
        <tr>
            <td>
                {if $vv.race_info.status == 1 || $vv.to_race_info.status == 1 }<span class="layui-badge">PK中</span>
                {elseif $vv.race_info.status == -1 || $vv.to_race_info.status == -1 /}<span class="layui-badge layui-bg-orange">拒</span>{/if}
                {$vv.name}
            </td>
            <td>
                {if $vv.race_info.status == 1  }
                <a href="javascript:;" onclick="x_admin_show('PK详情','{:url('race/race_staff_detail')}?id={$vv.race_info.id}',false,'500','500');" class="layui-btn layui-btn-xs layui-btn-warm">PK详情</a>
                {elseif  $vv.to_race_info.status == 1 /}
                <a href="javascript:;" onclick="x_admin_show('PK详情','{:url('race/race_staff_detail')}?id={$vv.to_race_info.id}',false,'500','500');" class="layui-btn layui-btn-xs layui-btn-warm">PK详情</a>
                {elseif $vv.race_info.status == '0' /}
                <a href="javascript:;" onclick="x_admin_show('PK详情','{:url('race/race_staff_detail')}?id={$vv.race_info.id}',false,'500','500');" class="layui-btn layui-btn-xs layui-btn-primary layui-border-blue ">等待对方接受</a>
                {elseif $vv.to_race_info.status == '0' /}
                <a href="javascript:;" onclick="x_admin_show('PK详情','{:url('race/race_staff_detail')}?id={$vv.to_race_info.id}',false,'500','500');" class="layui-btn layui-btn-xs layui-btn-normal">等待你接受</a>
                {elseif $vv.race_info.status == -1 || $vv.to_race_info.status == -1 /}
                <a href="javascript:;" onclick="x_admin_show('发起PK','{:url('race/race_staff_add')}?to_admin_id={$vv.id}&race_id={$raceInfo.id}',false,'500','500');" class="layui-btn layui-btn-xs layui-btn-primary">发起PK</a>
                {else /}
                <a href="javascript:;" onclick="x_admin_show('发起PK','{:url('race/race_staff_add')}?to_admin_id={$vv.id}&race_id={$raceInfo.id}',false,'500','500');" class="layui-btn layui-btn-xs layui-btn-primary">发起PK</a>
                {/if}
            </td>
        </tr>
        {/foreach}
    </table>
    {/foreach}
    
    <table class="layui-table" lay-size="sm" style="width:19%; float:left;">
        <thead>
        <tr>
            <td colspan="3" align="center">PK中</td>
        </tr>
        </thead>
        {foreach name="raceList" id="value"}
        <tr>
            <td align="center">
                {:idToAdminname($value.admin_id)}
            </td>
            <td align="center">
                <img src="https://wimg.588ku.com/gif620/20/04/19/f8815d481c64ef7dbab379dc02914f9c.gif" width="25">
                <!--<img src="/static/admin/icon/icon_pk.png" width="25">-->
            </td>
            <td align="center">
                {if $value.to_admin_id == 1}公司{else /}{:idToAdminname($value.to_admin_id)}{/if}
            </td>
        </tr>
        {/foreach}
    </table>
    
    </div>
</div>


</body>

</html>